package com.mybatis.plus.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "osc_user")
@ToString
public class UserEntity {
    // 主键,自增长
    @TableId(value = "id",type = IdType.AUTO)
    private int id;
    // 姓名
    private String name;
    // 年龄
    private int age;
    // 地址
    private String address;
    // 爱好
    private String hobby;

    public UserEntity(String name, int age, String address, String hobby) {
        this.name = name;
        this.age = age;
        this.address = address;
        this.hobby = hobby;
    }
}
